<?php
Class Configuration{
    private $_application;
    private $_domain;
    private $_userdb;
    private $_passdb;
    private $_hostdb;
    private $_db;
    private $_dbType;
    private $_defaultApp;
    private $_MaxCrash;

    private $_configurationFiles    = array();

    static $_instance;

    private function __construct($configurationFiles){
        if(count($configurationFiles)){
            $this->_configurationFiles  = $configurationFiles;
            foreach($this->_configurationFiles as $file){
                require $file;
            }
        }
        
        $this->_application = $application;
        $this->_domain      = $domain;
        $this->_userdb      = $user;
        $this->_passdb      = $password;
        $this->_hostdb      = $host;
        $this->_db          = $db;
        $this->_dbType      = $dbType;
        $this->_defaultApp  = $defaultApp;
        $this->_MaxCrash    = $maxCrash;
    }

    private function __clone(){ }
    private function __wakeup(){ }

    public static function getInstance($configurationFiles=array()){
        if (!(self::$_instance instanceof self)){
            self::$_instance=new self($configurationFiles);
        }
        return self::$_instance;
    }

    public function getDomain(){
        $var=$this->_domain;
        return $var;
    }

    public function getUserDB(){
        $var=$this->_userdb;
        return $var;
    }

    public function getHostDB(){
        $var=$this->_hostdb;
        return $var;
    }

    public function getPassDB(){
        $var=$this->_passdb;
        return $var;
    }

    public function getDB(){
        $var=$this->_db;
        return $var;
    }

    public function getDBType(){
        $var=$this->_dbType;
        return $var;
    }

    public function getDefaultApp(){
        $var=$this->_defaultApp;
        return $var;
    }

}